package com.daohang361.imqq.hotLoader;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/** 
 * @author naner E-mail:likun3344@163.com 
 * @create time：2011-5-13 下午08:44:25 
 * 默认代理处理类  
 */  
public class DefaultInvocationHandler implements InvocationHandler {   
  
    /**  
     * 目标对象  
     */  
    protected Object target;   
  
    public DefaultInvocationHandler() {   
       
    }   
  
    /**  
     * 处理方法  
     */  
    public Object invoke(Object proxy, Method method, Object[] args)   
            throws Throwable {   
        System.out.println("before invoke");   
        Object returnValue = method.invoke(target, args);   
        System.out.println("after invoke");   
        return returnValue;   
    }   
  
    public Object getTarget() {   
        return target;   
    }   
  
    public void setTarget(Object target) {   
        this.target = target;   
    }   
}  
